<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="lib/html5shiv.js"></script>
    <script type="text/javascript" src="lib/respond.min.js"></script>
    <![endif]-->
    <link href="/static/admin/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="/static/admin/static/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css"/>
    <link href="/static/admin/static/h-ui.admin/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="/static/admin/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css"/>
    <!--[if IE 6]>
    <script type="text/javascript" src="/static/admin/lib/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>后台找回密码 - 期金管家</title>
    <style>
        .loginWraper {
            BACKGROUND-SIZE: 100%;
        }
    </style>
</head>
<body>
<input type="hidden" id="TenantId" name="TenantId" value=""/>
<div class="header">期金管家&nbsp;-&nbsp;会员后台管理系统</div>
<div class="loginWraper">
    <div id="loginform" class="loginBox">
        <form class="form form-horizontal" action="{:url('vip_agent/Login/setLogin')}" method="post">
            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
                <div class="formControls col-xs-8">
                    <input id="username" name="phonenumber" type="text" placeholder="手机号" class="input-text size-L">
                </div>
            </div>


            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe6c7;</i></label>
                <div class="formControls col-xs-8">
                    <input class="input-text size-L" name="code" id="yzcode" type="text" placeholder="验证码"  style="width:150px;">
                <input type="button" value="获取验证码" id="resCode" class="btn btn-success radius size-L" onclick="send()">
                </div>
            </div>

            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
                <div class="formControls col-xs-8">
                    <input id="newPassword01" name="newPassword01" type="password" placeholder="新密码" class="input-text size-L">
                </div>
            </div>

            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
                <div class="formControls col-xs-8">
                    <input id="newPassword02" name="newPassword02" type="password" placeholder="确认密码" class="input-text size-L">
                </div>
            </div>

            <!--<div class="row cl">-->
                <!--<div class="formControls col-xs-8 col-xs-offset-3">-->
                    <!--<label for="rem">-->
                        <!--<input type="checkbox" name="rem" id="rem">使我保持登录状态</label>-->
                <!--</div>-->
            <!--</div>-->
            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3">
                    <input name="" type="submit" id="tj" class="btn btn-success radius size-L"
                           value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;提&nbsp;&nbsp;&nbsp;&nbsp;交&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;">
                    &nbsp;<a href="{:url('vip_agent/login/index')}">返回上一页</a>
                    <!--<input name="" type="reset" class="btn btn-default radius size-L"-->
                           <!--value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">-->
                </div>
            </div>
        </form>
    </div>
</div>
<div class="footer">Copyright 浙江陆诚资产管理有限公司</div>
<script type="text/javascript" src="/static/admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/admin/static/h-ui/js/H-ui.min.js"></script>

<script>

    var countdown=60;
    function send(){
        var obj = $("#resCode");
        var mobile = $("input[name='phonenumber']").val();
        if(mobile.match(/(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/) == null){
            alert('手机账号格式错误');
        }else{
            $.ajax({
                url : '/vip_agent/Login/registersendMsg',
                type:"POST",
                data:{
                    mobile:mobile,
                },
                success:function(data){
                    if(data['msg']=='success'){
                        alert('验证码发送成功');
                        settime(obj);
                    }else{
                        alert(data['msg']);
                    }
                }
            });

        }
    }


    function settime(obj) { //发送验证码倒计时
        if (countdown == 0) {
            obj.attr('disabled',false);
            obj.val("获取验证码");
            $("#resCode").css("background","#00bc12");
            countdown = 60;
            return;
        } else {
            obj.attr('disabled',true);
            obj.val("(" + countdown + ")S后重新发送");
            countdown--;
            $("#resCode").css("background","#ccc")
        }
        setTimeout(function() {
                settime(obj) }
            ,1000)
    }



</script>
